﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BrandLoad.aspx.cs" Inherits="BrandLoad" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>品牌录入</title>
</head>
<script language="javascript" type="text/javascript">
  function CheckImg(FileUpload)
  {
  var mime=FileUpload.value;
  mime=mime.toLowerCase().substr(mime.lastIndexOf("."));
  if(!((mime==".jpg")||(mime==".gif")||(mime==".bmp")))
  {
  //document.form1.FileUpload.value="";//？？不能清空路径
  document.form1.FileUpload1.value="";//？？不能清空路径
  alert("仅支持JPG/GIF/BMP格式");   
  }
  else
  {
  document.form1.lblpathName.value=FileUpload.value; //想把路径赋值给lblpathName控件，以备后台调用(？？后台获取为何是"")  
  }
  }
    
  </script>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:Label ID="Type" Text="类型" runat="server"  />
    <asp:DropDownList ID="Typelist" runat="server" AutoPostBack="true" OnSelectedIndexChanged ="TypeSelecetChanged" />
    <asp:DropDownList ID="TypeClass" Width="80px" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ClassSelecetChanged" />&nbsp;<br />
        <br />
    <asp:Label ID="GoodsName" Text="品牌名" runat="server" />
    <asp:TextBox ID="GoodsNameInput" runat="server" />
    <asp:Label ID="Label1" Text="品牌英文名" runat="server" />
    <asp:TextBox ID="TextBox1" runat="server" />
        <br />
        <br />
        <br />
        <asp:Label ID="Label2" Text="品牌图片" runat="server" />&nbsp;
        <asp:FileUpload ID="uplode" runat="server" Enabled="true" Width="400px" onchange="CheckImg(this)" />&nbsp;<br />
        <br /><asp:Label ID="Label3" Text="品牌描述" runat="server" /><br />
        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    <asp:TextBox ID="Des" runat="server" TextMode="MultiLine" Height="200px" Width="384px" /><br />
        <br />
        <asp:Label ID="Label4" Text="品牌排名（填整数）" runat="server" />
        &nbsp;
        <asp:TextBox ID="TextBox2" runat="server" /><br />
        <br />
    <asp:Button ID="ButtonQuery" runat="server" OnClick="QueryClick" Text="录入" /></div>
    </form>
</body>
</html>
